import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
public class UrlParser {

    httpClient httpCl = new httpClient();
    Set<String> references;

    Set<String> getParsedUrl() throws IOException,NoSuchUrlException {

        references=new TreeSet<String>();
        String html = httpCl.getHttpResponse();
        Pattern pattern = Pattern.compile("(https?:\\/\\/)([\\w]+).([a-zA-Z])([\\p{ASCII}&&[^\\\"\\']])+");
        Matcher match = pattern.matcher(html);

        while(match.find()) {
            references.add(match.group());
        }
        return references;
    }
}

